<local:DocumentBase x:Class="WPFExcelReport.UBTKD03"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                   xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"  
                    xmlns:KD="clr-namespace:WPFExcelReport;assembly=TKDSTAMM"
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
                      xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT" 
                    xmlns:SP="clr-namespace:WPFExcelReport;assembly=TKDANSP"   
                    xmlns:KR="clr-namespace:WPFExcelReport;assembly=TKUNDADR" 
                    xmlns:KV="clr-namespace:WPFExcelReport;assembly=TKUNDVER" 
                    xmlns:VK="clr-namespace:WPFExcelReport;assembly=TVKKOPF"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"    
                    FontSize="14" 
>
    <local:DocumentBase.Resources>
        <ucd:TextTrimmingConverter x:Key="Trim"/>
        <ucd:BoolToVisibilityConverter x:Key="bv"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
    </local:DocumentBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>

        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>

            </Grid.ColumnDefinitions>
            <Border BorderBrush="White" BorderThickness="5" CornerRadius="8" >
                <Border BorderBrush="Black" BorderThickness="1.5" CornerRadius="8">
                    <Border Grid.Column="0"   BorderBrush="DarkGray" BorderThickness=".0,.0,2,2" CornerRadius="11"  >
                        <KD:TUBTKD02 
                  FTAUTOSUM="True"
                  SKEY1="KDMANDANT"  KEY1="KDVERSUML" 
                            TKEY1="已开票"
                  SKEY2="KDMANDANT"  KEY2="SWING" TKEY2="总欠费"
                  TCOUNT1="总个数"
                  ORDERNUM="{Binding KEY,ElementName=cKD}" 
                  x:Name="cList"/>
                    </Border>
                </Border>
            </Border>
            <VK:TVK03 Grid.Column="1"  
                      KUNDNRBY="{Binding KEY,ElementName=cKD}"/>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="1*"/>
            </Grid.ColumnDefinitions>
            <Border BorderBrush="White" BorderThickness="5" CornerRadius="8" >
                <Border BorderBrush="Black" BorderThickness="1.5" CornerRadius="8">
                    <Border Grid.Row="1" Grid.Column="0"    BorderBrush="DarkGray" BorderThickness=".0,.0,2,2" CornerRadius="11"  >
                        <KD:TUBTKD  x:Name="cKD"  
                       IsEdit="{Binding IsEdit,ElementName=cList}"
                       IsSaved="{Binding IsSaved,ElementName=cList}"
                       ORDERNUM="{Binding KEY,ElementName=cList}" />
                    </Border>
                </Border>
            </Border>

            <SP:TKD14  Grid.Row="1" Grid.Column="1"  x:Name="cKD14"  
                        VerticalAlignment="Top"
                        EXAUF="{Binding KEY,ElementName=cKD}"  />

        </Grid>

        <KR:TKUNDADR  Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"  Margin="0,10,0,0"
                      KUNDNR="{Binding KEY,ElementName=cKD}" 
                      />

        <KV:TKUNDVER  Margin="0,10,0,0"  Grid.Row="2" Grid.Column="1" 
                      KUNDNR="{Binding KEY,ElementName=cKD}" Visibility="Collapsed"
                      />

    </Grid>
</local:DocumentBase>
    
